﻿<%@ Page Title="" Language="C#" MasterPageFile="~/layout/admin.Master" AutoEventWireup="true" CodeBehind="CentralBar.aspx.cs" Inherits="SinhNhat.admin.slider.CentralBar" %>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentMain" runat="server">
    <script type="text/javascript" src="/ckfinder/ckfinder.js"></script>
    <script type="text/javascript">
        function BrowseServer(startupPath) {
            // You can use the "CKFinder" class to render CKFinder in a page:
            var finder = new CKFinder();
            // The path for the installation of CKFinder (default = "/ckfinder/").
            finder.basePath = '../';
            //Startup path in a form: "Type:/path/to/directory/"
            finder.startupPath = startupPath;
            // Name of a function which is called when a file is selected in CKFinder.
            finder.selectActionFunction = ShowThumbnails;
            // Launch CKFinder
            finder.popup();
        }

        // This is a sample function which is called when a thumbnail is selected in CKFinder.
        function ShowThumbnails(fileUrl, data) {
            // this = CKFinderAPI
            $("#thumbnails img").attr("src", fileUrl);
            $("#thumbnails input").val(fileUrl);
            $("#thumbnails div").text(data["fileSize"] + 'KB');

            $('#thumbnails').css("display", "");
            // It is not required to return any value.
            // When false is returned, CKFinder will not close automatically.*/
            return false;
        }
	</script>
	<div class="box grid_8 round_all">
		<h2 class="box_head grad_colour">Tạo widget Trên Sidebar</h2>
					
		<div class="toggle_container">
			<div class="block">
                    <label>Tên Banner Trung Tâm</label> 
					<input runat="Server" id="name"  title="Tên của Widget được hiện phía trên của nội dung" type="text" class="medium required" autofocus/> 
				    
                    <label>Link</label> 
				    <input runat="Server" id="link"  title="Link người dùng click vào ảnh" type="text" class="large"/> 
					
                    <div>
		                <strong>Banner</strong><br/>
                        <div class="separator_5"></div>
		                <input style="float:left" type="button" value="Browse Server..." onclick="BrowseServer( 'Images:/' );" />
                        <div id="thumbnails" style="float:left; margin-left:30px;" >
				            
                            <asp:Image ImageUrl="/data/images/no_image.jpg" width="686px" height="244px" ID="CentralBar_image"  runat="server" />
                            <asp:HiddenField ID="ImageHidden" runat="server" />
                        </div>
                    </div>
                
                    <div class="separator_1"></div>
                    <div class="separator_1"></div>
                    <button id="btnSave" class="button_colour round_all">
                        <img height="24" width="24" alt="Bended Arrow Right" src="/public/css/images/admin/Bended_Arrow_Right.png"/>
                        <span>Lưu kết quả</span>
                    </button>
                                
			</div>
		</div>
	</div>
</asp:Content>
